<template>
    <div class="app-container suserinfo">
        <div v-show="isshow">
            <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="95px">
                <el-form-item label="申请时间" prop="createdTime">
                    <el-date-picker clearable size="small" @keyup.enter.native="handleQuery" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px" v-model="queryParams.startTime" type="date" placeholder="选择申请时间"> </el-date-picker>
                </el-form-item>
                <el-form-item label="企业名称" prop="companyName">
                    <el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <!--<el-form-item label="所在省" prop="addressProvice">
        <el-input
          v-model="queryParams.addressProvice"
          placeholder="请输入所在省"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="所在市" prop="addressCity">
        <el-input
          v-model="queryParams.addressCity"
          placeholder="请输入所在市"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="所在区" prop="addressArea">
        <el-input
          v-model="queryParams.addressArea"
          placeholder="请输入所在区"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="详细地址" prop="address">
        <el-input
          v-model="queryParams.address"
          placeholder="请输入详细地址"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
                <el-form-item label="联系人姓名" prop="contactPerson" label-width="10">
                    <el-input v-model="queryParams.contactPerson" placeholder="请输入联系人姓名" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item label="联系人手机号" prop="contactPhone" label-width="30">
                    <el-input v-model="queryParams.contactPhone" placeholder="请输入联系人手机号" clearable size="small" @keyup.enter.native="handleQuery" />
                </el-form-item>
                <el-form-item label="认证状态" prop="applyStatus">
                    <el-select v-model="queryParams.applyStatus" placeholder="请选择认证状态" clearable size="small">
                        <el-option v-for="dict in applyStatusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
                    </el-select>
                </el-form-item>
                <!--<el-form-item label="联系人邮箱" prop="contactEmail">
        <el-input
          v-model="queryParams.contactEmail"
          placeholder="请输入联系人邮箱"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="法人姓名" prop="legalPerson">
        <el-input
          v-model="queryParams.legalPerson"
          placeholder="请输入法人姓名"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="法人手机号" prop="legalPhone">
        <el-input
          v-model="queryParams.legalPhone"
          placeholder="请输入法人手机号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="法人身份证号" prop="legalIdcard">
        <el-input
          v-model="queryParams.legalIdcard"
          placeholder="请输入法人身份证号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="法人身份证附件" prop="legalIdcardFile">
        <el-input
          v-model="queryParams.legalIdcardFile"
          placeholder="请输入法人身份证附件"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="企业营业执照" prop="legalOperateFile">
        <el-input
          v-model="queryParams.legalOperateFile"
          placeholder="请输入企业营业执照"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="经营范围" prop="businessScope">
        <el-input
          v-model="queryParams.businessScope"
          placeholder="请输入经营范围"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="营业期限" prop="operatingStartTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.operatingStartTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择营业期限">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="营业期限" prop="operatingEndTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.operatingEndTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择营业期限">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="企业信用代码" prop="companyCode">
        <el-input
          v-model="queryParams.companyCode"
          placeholder="请输入企业信用代码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司网址" prop="companyWeb">
        <el-input
          v-model="queryParams.companyWeb"
          placeholder="请输入公司网址"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司座机" prop="companyPhone">
        <el-input
          v-model="queryParams.companyPhone"
          placeholder="请输入公司座机"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司简介" prop="companyIntro">
        <el-input
          v-model="queryParams.companyIntro"
          placeholder="请输入公司简介"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="授信额度" prop="quota">
        <el-input
          v-model="queryParams.quota"
          placeholder="请输入授信额度"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="额度有效期" prop="quotaStartTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.quotaStartTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择额度有效期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="额度有效期" prop="quotaEndTime">
        <el-date-picker clearable size="small" style="width: 200px"
          v-model="queryParams.quotaEndTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择额度有效期">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="预存款" prop="deposit">
        <el-input
          v-model="queryParams.deposit"
          placeholder="请输入预存款"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>-->
                <el-form-item>
                    <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['biz:userinfo:export']">导出</el-button>
                    <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                    <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
                </el-form-item>
            </el-form>
            <el-row :gutter="10" class="mb8">
                <!--<el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['biz:userinfo:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['biz:userinfo:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['biz:userinfo:remove']"
        >删除</el-button>
      </el-col>-->
                <!--                <el-col :span="1.5">

                </el-col> -->
            </el-row>

            <el-table v-loading="loading" :data="userinfoList">
                <el-table-column type="selection" width="55" align="center" />
                <el-table-column label="企业ID" align="center" prop="uid" />
                <el-table-column label="企业名称" align="center" prop="companyName" />
                <!--                <el-table-column
                    label="详细地址"
                    align="center"
                    prop="address"
                /> -->
                <el-table-column label="联系人姓名" align="center" prop="contactPerson" />
                <el-table-column label="联系人手机号" align="center" prop="contactPhone" />
                <el-table-column label="联系人邮箱" align="center" prop="contactEmail" />
                <el-table-column label="申请时间" align="center" prop="applyTime" />
                <el-table-column label="认证状态" align="center" prop="applyStatus" />
                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['biz:userinfo:edit']">审核</el-button>
                        <!-- <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['biz:userinfo:remove']"
            >选品列表</el-button
          > -->
                        <el-button size="mini" type="text" icon="el-icon-delete" @click="reqlists(scope.row)">选品列表</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

            <!-- 添加或修改用户详情对话框 -->
            <el-dialog :title="title" :visible.sync="open" width="95%" append-to-body>
                <div class="el-dialog-div">
                    <el-form ref="form" :model="form" :rules="rules" label-width="120px" class="">
                        <el-form-item label="企业名称" prop="companyName" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.companyName" placeholder="请输入企业名称" :disabled="readonly" />
                        </el-form-item>
<!--                        <el-form-item label="所在省" prop="addressProvice" style="width: 25%;min-width:300px;float:left">-->
<!--                            <el-input v-model="form.addressProvice" placeholder="请输入所在省" :disabled="readonly" />-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="所在市" prop="addressCity" style="width: 25%;min-width:300px;float:left">-->
<!--                            <el-input v-model="form.addressCity" placeholder="请输入所在市" :disabled="readonly" />-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="所在区" prop="addressArea" style="width: 25%;min-width:300px;float:left">-->
<!--                            <el-input v-model="form.addressArea" placeholder="请输入所在区" :disabled="readonly" />-->
<!--                        </el-form-item>-->
                        <el-form-item label="详细地址" prop="address" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.address" placeholder="请输入详细地址" :disabled="readonly" />
                        </el-form-item>

                        <el-form-item label="联系人姓名" prop="contactPerson" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.contactPerson" placeholder="请输入联系人姓名" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="联系人手机号" prop="contactPhone" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.contactPhone" placeholder="请输入联系人手机号" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="联系人邮箱" prop="contactEmail" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.contactEmail" placeholder="请输入联系人邮箱" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="法人姓名" prop="legalPerson" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.legalPerson" placeholder="请输入法人姓名" :disabled="readonly" />
                        </el-form-item>

<!--                        <el-form-item label="法人手机号" prop="legalPhone" style="width: 25%;min-width:300px;float:left">-->
<!--                            <el-input v-model="form.legalPhone" placeholder="请输入法人手机号" :disabled="readonly" />-->
<!--                        </el-form-item>-->
                        <el-form-item label="法人身份证号" prop="legalIdcard" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.legalIdcard" placeholder="请输入法人身份证号" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="企业信用代码" prop="companyCode" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.companyCode" placeholder="请输入企业信用代码" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="经营范围" prop="businessScope" style="width: 25%;min-width:300px;float:left">
                            <el-input v-model="form.businessScope" placeholder="请输入经营范围" :disabled="readonly" />
                        </el-form-item>
                        <el-form-item label="营业期限" prop="operatingStartTime" style="width: 25%;min-width:300px;float:left">
                            <el-date-picker clearable size="small" v-model="form.operatingStartTime" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择营业期限" :disabled="readonly"> </el-date-picker>
                        </el-form-item>
                        <el-form-item label="营业期限" prop="operatingEndTime" style="width: 25%;min-width:300px;float:left">
                            <el-date-picker clearable size="small" v-model="form.operatingEndTime" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择营业期限" :disabled="readonly"> </el-date-picker>
                        </el-form-item>
<!--                        <div style="width:100%;overflow:hidden">-->

                            <el-form-item label="公司网址" prop="companyWeb" style="width: 25%;min-width:300px;float:left">
                                <el-input v-model="form.companyWeb" placeholder="请输入公司网址" :disabled="readonly" />
                            </el-form-item>
                            <el-form-item label="公司座机" prop="companyPhone" style="width: 25%;min-width:300px;float:left">
                                <el-input v-model="form.companyPhone" placeholder="请输入公司座机" :disabled="readonly" />
                            </el-form-item>
<!--                        </div>-->
                        <div>
                            <el-form-item label="公司简介" prop="companyIntro" style="width: 25%;min-width:300px">
                                <el-input type="textarea" placeholder="请输入公司简介" v-model="form.companyIntro" show-word-limit :disabled="readonly" rows="6"> </el-input>
                            </el-form-item>
                            <div>
                                <el-form-item label="法人身份证附件" prop="legalIdcardFile" style="float:left">
                                    <el-image class="ml" v-for="(item, index) in idImgList" :key="index" style="width: 100px; height: 100px" :src="url + item" :preview-src-list="srcList"> </el-image>
                                </el-form-item>
                                <el-form-item label="企业营业执照" prop="legalOperateFile" style="float:left">
                                    <el-image v-for="(item, index) in opImgList" :key="index" style="width: 100px; height: 100px" :src="url + item" :preview-src-list="srcList"> </el-image>
                                </el-form-item>
                            </div>
                        </div>
                    </el-form>
                </div>
                <div slot="footer" class="dialog-footer" v-if="show">
                    <el-button type="primary" @click="checkApply(2)">通 过</el-button>
                    <el-button @click="checkApply(3)">不通过</el-button>
                </div>
            </el-dialog>
            <!-- 选品列表 -->
            <el-dialog class="el-dialog-div" width="1300px" style="height: 100%;" title="选品列表" :visible.sync="dialogTableVisible">
                <el-select v-model="value" placeholder="请选择店铺" style="margin-bottom: 10px;" @change="cdscdscscscs">
                    <el-option v-for="(item, index) in shoplist" :key="index" :label="item.name" :value="item.id"> </el-option>
                </el-select>

                <el-button icon="el-icon-refresh" size="mini" @click="resetQuergoodslist">重置</el-button>
                <div class="el-dialog-div">
                    <el-table :data="reqlistdata.records">
                        <el-table-column prop="goodsInfo.brandName" label="品牌" width="150"></el-table-column>
                        <el-table-column prop="goodsInfo.categoryName" label="类目" width="150"></el-table-column>
                        <el-table-column prop="goodsInfo.goodsName" label="名称" width="150"></el-table-column>
                        <el-table-column prop="goodsInfo.goodsModel" label="货号" width="200"></el-table-column>
                        <el-table-column prop="goodsInfo.skuNo" label="SKU"></el-table-column>
                        <el-table-column prop="goodsInfo.price" label="供货价"></el-table-column>
                        <el-table-column prop="goodsInfo.isLock" label="是否锁库"></el-table-column>
                        <el-table-column prop="goodsInfo.lockNum" label="锁库量"></el-table-column>
                    </el-table>

                    <pagination layout="prev, pager, next" v-show="reqlistdata.total > 0" :total="reqlistdata.total" :page.sync="thisdatas.current" :limit.sync="reqlistdata.size" @pagination="getgoodsLists" />
                </div>
            </el-dialog>
        </div>
    </div>
</template>
<script>
import { listUserinfo, getUserinfo, delUserinfo, addUserinfo, updateUserinfo, exportUserinfo, reqlist, getshoplist } from '@/api/biz/userinfo';

export default {
    name: 'Userinfo',
    data() {
        return {
            url: process.env.VUE_APP_BASE_API,
            isshow: true,
            // 遮罩层
            loading: true,
            // 选中数组
            ids: [],
            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            readonly: true,
            // 总条数
            total: 0,
            // 用户详情表格数据
            userinfoList: [],
            // 弹出层标题
            title: '',
            // 认证状态  0未提交 1 提交审核  2 认证通过 3 认证不通过字典
            applyStatusOptions: [],
            // 是否显示弹出层
            open: false,
            show: true,
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                uid: undefined,
                companyName: undefined,
                addressProvice: undefined,
                addressCity: undefined,
                addressArea: undefined,
                address: undefined,
                contactPerson: undefined,
                contactPhone: undefined,
                contactEmail: undefined,
                legalPerson: undefined,
                legalPhone: undefined,
                legalIdcard: undefined,
                legalIdcardFile: undefined,
                legalOperateFile: undefined,
                businessScope: undefined,
                operatingStartTime: undefined,
                operatingEndTime: undefined,
                companyCode: undefined,
                companyWeb: undefined,
                companyPhone: undefined,
                companyIntro: undefined,
                quota: undefined,
                createdTime: undefined,
                quotaEndTime: undefined,
                deposit: undefined,
                applyStatus: undefined,
                startTime: ''
            },
            // 表单参数
            form: {},
            // 表单校验
            rules: {
                uid: [
                    {
                        required: true,
                        message: '用户id不能为空',
                        trigger: 'blur'
                    }
                ]
            },
            //   选品列表
            dialogTableVisible: false,
            gridData: [
                {
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                },
                {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                },
                {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                },
                {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }
            ],
            //   选品列表_店铺
            options: [
                {
                    value: '选项1',
                    label: '黄金糕'
                },
                {
                    value: '选项2',
                    label: '双皮奶'
                },
                {
                    value: '选项3',
                    label: '蚵仔煎'
                },
                {
                    value: '选项4',
                    label: '龙须面'
                },
                {
                    value: '选项5',
                    label: '北京烤鸭'
                }
            ],
            value: '',
            srcList: [],
            // 列表
            totals: 0,
            pageNums: '',
            pageSizes: '',
            reqlistdata: [],
            goodsInfoList: [],
            thisdatas: {
                uid: undefined,
                current: undefined,
                shopid: undefined
            },
            shoplist: [],
            idImgList: [],
            opImgList: []
        };
    },
    created() {
        this.getList();
        this.getDicts('aptitude_search_status').then(response => {
            this.applyStatusOptions = response.data;
        });
    },
    methods: {
        // 认证状态  0未提交 1 提交审核  2 认证通过 3 认证不通过字典翻译
        applyStatusFormat(row, column) {
            return this.selectDictLabel(this.applyStatusOptions, row.applyStatus);
        },
        /** 查询用户详情列表 */
        getList() {
            this.loading = true;
            listUserinfo(this.queryParams, 0).then(response => {
                this.userinfoList = response.rows;
                this.total = response.total;
                this.loading = false;
            });
        },
        // 取消按钮
        cancel() {
            this.open = false;
            this.reset();
        },
        // 表单重置
        reset() {
            this.form = {
                id: undefined,
                uid: undefined,
                companyName: undefined,
                addressProvice: undefined,
                addressCity: undefined,
                addressArea: undefined,
                address: undefined,
                contactPerson: undefined,
                contactPhone: undefined,
                contactEmail: undefined,
                legalPerson: undefined,
                legalPhone: undefined,
                legalIdcard: undefined,
                legalIdcardFile: undefined,
                legalOperateFile: undefined,
                businessScope: undefined,
                operatingStartTime: undefined,
                operatingEndTime: undefined,
                companyCode: undefined,
                companyWeb: undefined,
                companyPhone: undefined,
                companyIntro: undefined,
                quota: undefined,
                quotaStartTime: undefined,
                quotaEndTime: undefined,
                deposit: undefined,
                startTime: undefined
            };
            this.resetForm('form');
            this.queryParams.startTime = undefined;
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1;
            this.getList();
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.resetForm('queryForm');
            this.handleQuery();
            this.reset();
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset();
            const id = row.id || this.ids;
            getUserinfo(id).then(response => {
                this.form = response.data[0];
                this.form.addressProvice = response.data[1];
                this.form.addressCity = response.data[2];
                this.form.addressArea = response.data[3];
                if (this.form.applyStatus != 1) {
                    this.show = false;
                }
                this.open = true;
                this.title = '渠道审核';
                this.srcList = [];
                this.idImgList = this.form.legalIdcardFile.split(',');
                this.opImgList = this.form.legalOperateFile.split(',');
                this.idImgList.forEach(element => {
                    this.srcList.push(this.url + element);
                });
                console.log(this.srcList);

                this.opImgList.forEach(element => {
                    this.srcList.push(this.url + element);
                });
                // this.srcList.push(
                //     "" + this.url + this.form.legalIdcardFile + ""
                // );
                // this.srcList.push(
                //     "" + this.url + this.form.legalOperateFile + ""
                // );
            });
        },
        /** 提交按钮 */
        checkApply: function(status) {
            if (this.form.id != undefined) {
                this.getUrl('/web/applyStatus/' + this.form.id + '/' + status).then(response => {
                    if (response.code === 200) {
                        this.msgSuccess('修改成功');
                        this.open = false;
                        this.getList();
                    } else {
                        this.msgError(response.msg);
                    }
                });
            }
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            const ids = row.id || this.ids;
            this.$confirm('是否确认删除用户详情编号为"' + ids + '"的数据项?', '警告', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            })
                .then(function() {
                    return delUserinfo(ids);
                })
                .then(() => {
                    this.getList();
                    this.msgSuccess('删除成功');
                })
                .catch(function() {});
        },
        /** 导出按钮操作 */
        handleExport() {
            const queryParams = this.queryParams;
            this.$confirm('是否确认导出用户详情数据项?', '警告', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            })
                .then(function() {
                    return exportUserinfo(queryParams);
                })
                .then(response => {
                    this.download(response.msg);
                })
                .catch(function() {});
        },

        getgoodsLists: function() {
            reqlist(this.thisdatas).then(response => {
                if (response.code == 200) {
                    this.reqlistdata = response.data;
                    this.dialogTableVisible = true;
                }
            });
        },

        getshopLists: function() {
            getshoplist(this.thisdatas.uid).then(response => {
                if (response.code == 200) {
                    this.shoplist = response.data;
                }
            });
        },

        cdscdscscscs: function(e) {
            this.thisdatas.shopid = e;
            this.thisdatas.current = 1;
            this.getgoodsLists();
        },
        // 选品列表
        reqlists(e) {
            this.shoplist = [];
            this.thisdatas.current = 1;
            this.thisdatas.uid = e.uid;
            this.value = '';
            this.getshopLists();
            this.getgoodsLists();

        },
        resetQuergoodslist() {
            this.value = '';
            this.thisdatas.current = 1;
            this.thisdatas.shopid = undefined;
            this.getgoodsLists();
        }
    }
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-dialog-div {
    width: 100%;
    height: 60vh;
    overflow: auto;
    overflow-x: hidden;
}
.el-image {
    margin-left: 20px;
}
.suserinfo .el-dialog__wrapper {
    bottom: 204px !important;
}
.suserinfo .el-dialog-div {
    height: 60vh;
    overflow: auto;
}
</style>
